package com.gdteam.kernel.content;

import com.gdteam.kernel.Service;

/**
 * Contentindexation service manager, used to 
 * handle content indexation service lifecycle.
 * Current release features default local filesystem
 * indexation, but IndexManager can be used to 
 * create / delete new indexation service. 
 *  
 * @author erwan
 *
 */
public interface IndexManager extends Service {
    
    String FQN = "com.gdteam.kernel.indexmanager"; 

    /**
     * File System indexation service creator
     * @param idxName indexname (must be unique)
     * @param path Root indexation path
     * @return 
     */
    ContentIndexationService createFSIndexService(String idxName, String path);
    
    /**
     * Indexation service getter
     * 
     * @param index index to look for
     * @return Corresponding indexation service (if any), null otherwise
     */
    ContentIndexationService getIndexationService(String index);
    
}
